package com.ruoyi.common.translation.impl;

import org.springframework.stereotype.Component;

import com.ruoyi.common.annotation.TranslationType;
import com.ruoyi.common.constant.TransConstant;
import com.ruoyi.common.core.service.PostService;
import com.ruoyi.common.translation.TranslationInterface;

import lombok.AllArgsConstructor;

/**
 * 岗位 id 转 名称
 * @author cc
 *
 */
@Component
@AllArgsConstructor
@TranslationType(type = TransConstant.POST_ID_TO_NAME)
public class PostNameTranslationImpl implements TranslationInterface<String> {

	private final PostService postService;
	
    public String translation(Object key, String other) {
        return postService.selectPostNameById(key.toString());
    }
}
